<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: esp8266/debug.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_cc2d49507704e901eabd8a82be491fc5.html">esp8266</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">debug.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="debug_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="user__config_8h.html">user_config.h</a>&quot;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="mathio_8h.html">mathio.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="debug_8h.html">debug.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="debug_8c.html#a9f0e0c76de59f37f7fd820521a21defb">   37</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="debug_8c.html#a9f0e0c76de59f37f7fd820521a21defb">_uart0_fn</a>(<span class="keyword">struct</span> <a class="code" href="struct__printf__t.html">_printf_t</a> *p, <span class="keywordtype">char</span> ch)</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        p-&gt;<a class="code" href="struct__printf__t.html#a872716fd701166cd57bd3fffb7b77706">sent</a>++;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">//FIXME</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="comment">//uart_putc(0, ch);</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#ifdef UART_QUEUED_TX</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <a class="code" href="uart_8h.html#a7d280257d3443fa5f3d6bb7007e2a543">uart_queue_putc</a>(0, ch);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <a class="code" href="uart_8c.html#aad52b616aa1f07c5a59a5ddb6be602dc">uart_putc</a>(0, ch);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;}</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;   </div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="debug_8h.html#ade3e7ae993ed25e4cd1d64035c6bdbd8">   54</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="debug_8c.html#ab4ff4ed4ffc744d909dee04c5787376b">uart0_printf</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;{</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">int</span> len;   </div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <a class="code" href="struct__printf__t.html">printf_t</a> fn;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    va_list va;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    fn.<a class="code" href="struct__printf__t.html#a3ef8eb0143b93d4446b04c6ce9313be7">put</a> = <a class="code" href="debug_8c.html#a9f0e0c76de59f37f7fd820521a21defb">_uart0_fn</a>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    fn.<a class="code" href="struct__printf__t.html#a872716fd701166cd57bd3fffb7b77706">sent</a> = 0;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;   </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    va_start(va, format);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <a class="code" href="mathio_8h.html#a1c2762f15e2ae4dea9b52ee9e3532372">_printf_fn</a>(&amp;fn, format, va);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    va_end(va);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    len = fn.<a class="code" href="struct__printf__t.html#a872716fd701166cd57bd3fffb7b77706">sent</a>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">//uart_tx_flush(0);</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordflow">return</span> len;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;}</div><div class="ttc" id="user__config_8h_html"><div class="ttname"><a href="user__config_8h.html">user_config.h</a></div><div class="ttdoc">Master include file for project Includes all project includes and defines here. </div></div>
<div class="ttc" id="debug_8h_html"><div class="ttname"><a href="debug_8h.html">debug.h</a></div><div class="ttdoc">Small printf user function. </div></div>
<div class="ttc" id="uart_8h_html_a7d280257d3443fa5f3d6bb7007e2a543"><div class="ttname"><a href="uart_8h.html#a7d280257d3443fa5f3d6bb7007e2a543">uart_queue_putc</a></div><div class="ttdeci">MEMSPACE void uart_queue_putc(uint8_t uart_no, char c)</div></div>
<div class="ttc" id="mathio_8h_html_a1c2762f15e2ae4dea9b52ee9e3532372"><div class="ttname"><a href="mathio_8h.html#a1c2762f15e2ae4dea9b52ee9e3532372">_printf_fn</a></div><div class="ttdeci">MEMSPACE void _printf_fn(printf_t *fn, __memx const char *fmt, va_list va)</div><div class="ttdoc">vsnprintf function </div><div class="ttdef"><b>Definition:</b> <a href="printf_8c_source.html#l00741">printf.c:741</a></div></div>
<div class="ttc" id="debug_8c_html_a9f0e0c76de59f37f7fd820521a21defb"><div class="ttname"><a href="debug_8c.html#a9f0e0c76de59f37f7fd820521a21defb">_uart0_fn</a></div><div class="ttdeci">static void _uart0_fn(struct _printf_t *p, char ch)</div><div class="ttdoc">_uart0_fn low level function that writes a character with uart0har() </div><div class="ttdef"><b>Definition:</b> <a href="debug_8c_source.html#l00037">debug.c:37</a></div></div>
<div class="ttc" id="debug_8c_html_ab4ff4ed4ffc744d909dee04c5787376b"><div class="ttname"><a href="debug_8c.html#ab4ff4ed4ffc744d909dee04c5787376b">uart0_printf</a></div><div class="ttdeci">MEMSPACE int uart0_printf(const char *format,...)</div><div class="ttdoc">printf function </div><div class="ttdef"><b>Definition:</b> <a href="debug_8c_source.html#l00054">debug.c:54</a></div></div>
<div class="ttc" id="uart_8c_html_aad52b616aa1f07c5a59a5ddb6be602dc"><div class="ttname"><a href="uart_8c.html#aad52b616aa1f07c5a59a5ddb6be602dc">uart_putc</a></div><div class="ttdeci">MEMSPACE int uart_putc(uint8 uart_no, char c)</div><div class="ttdoc">Write a byte from a uart with NL to CR/NL conversion Note: This function waits/blocks util the write ...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00323">uart.c:323</a></div></div>
<div class="ttc" id="mathio_8h_html"><div class="ttname"><a href="mathio_8h.html">mathio.h</a></div><div class="ttdoc">Math IO functions, and verious conversion code with floating point support. </div></div>
<div class="ttc" id="cpu_8h_html_ad0fe97585b8891f5e4f2b9a6426330a4"><div class="ttname"><a href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="ttdeci">#define MEMSPACE</div><div class="ttdef"><b>Definition:</b> <a href="cpu_8h_source.html#l00025">cpu.h:25</a></div></div>
<div class="ttc" id="struct__printf__t_html_a872716fd701166cd57bd3fffb7b77706"><div class="ttname"><a href="struct__printf__t.html#a872716fd701166cd57bd3fffb7b77706">_printf_t::sent</a></div><div class="ttdeci">int sent</div><div class="ttdef"><b>Definition:</b> <a href="mathio_8h_source.html#l00086">mathio.h:86</a></div></div>
<div class="ttc" id="struct__printf__t_html_a3ef8eb0143b93d4446b04c6ce9313be7"><div class="ttname"><a href="struct__printf__t.html#a3ef8eb0143b93d4446b04c6ce9313be7">_printf_t::put</a></div><div class="ttdeci">void(* put)(struct _printf_t *, char)</div><div class="ttdef"><b>Definition:</b> <a href="mathio_8h_source.html#l00083">mathio.h:83</a></div></div>
<div class="ttc" id="struct__printf__t_html"><div class="ttname"><a href="struct__printf__t.html">_printf_t</a></div><div class="ttdoc">undefine any potential macro version of these functions </div><div class="ttdef"><b>Definition:</b> <a href="mathio_8h_source.html#l00081">mathio.h:81</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
